/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package entityprojet;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Ron
 */
@Entity
@Table(name = "F_CAISSE")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FCaisse.findAll", query = "SELECT f FROM FCaisse f"),
    @NamedQuery(name = "FCaisse.findByCANo", query = "SELECT f FROM FCaisse f WHERE f.cANo = :cANo"),
    @NamedQuery(name = "FCaisse.findByCAIntitule", query = "SELECT f FROM FCaisse f WHERE f.cAIntitule = :cAIntitule"),
    @NamedQuery(name = "FCaisse.findByCONo", query = "SELECT f FROM FCaisse f WHERE f.cONo = :cONo"),
    @NamedQuery(name = "FCaisse.findByCONoCaissier", query = "SELECT f FROM FCaisse f WHERE f.cONoCaissier = :cONoCaissier"),
    @NamedQuery(name = "FCaisse.findByJONum", query = "SELECT f FROM FCaisse f WHERE f.jONum = :jONum"),
    @NamedQuery(name = "FCaisse.findByCAIdentifCaissier", query = "SELECT f FROM FCaisse f WHERE f.cAIdentifCaissier = :cAIdentifCaissier"),
    @NamedQuery(name = "FCaisse.findByCADateCreation", query = "SELECT f FROM FCaisse f WHERE f.cADateCreation = :cADateCreation"),
    @NamedQuery(name = "FCaisse.findByNComptoir", query = "SELECT f FROM FCaisse f WHERE f.nComptoir = :nComptoir"),
    @NamedQuery(name = "FCaisse.findByNClavier", query = "SELECT f FROM FCaisse f WHERE f.nClavier = :nClavier"),
    @NamedQuery(name = "FCaisse.findByCALignesAfficheur", query = "SELECT f FROM FCaisse f WHERE f.cALignesAfficheur = :cALignesAfficheur"),
    @NamedQuery(name = "FCaisse.findByCAColonnesAfficheur", query = "SELECT f FROM FCaisse f WHERE f.cAColonnesAfficheur = :cAColonnesAfficheur"),
    @NamedQuery(name = "FCaisse.findByCAImpTicket", query = "SELECT f FROM FCaisse f WHERE f.cAImpTicket = :cAImpTicket"),
    @NamedQuery(name = "FCaisse.findByCASaisieVendeur", query = "SELECT f FROM FCaisse f WHERE f.cASaisieVendeur = :cASaisieVendeur"),
    @NamedQuery(name = "FCaisse.findByCASouche", query = "SELECT f FROM FCaisse f WHERE f.cASouche = :cASouche"),
    @NamedQuery(name = "FCaisse.findByCbProt", query = "SELECT f FROM FCaisse f WHERE f.cbProt = :cbProt"),
    @NamedQuery(name = "FCaisse.findByCbMarq", query = "SELECT f FROM FCaisse f WHERE f.cbMarq = :cbMarq"),
    @NamedQuery(name = "FCaisse.findByCbCreateur", query = "SELECT f FROM FCaisse f WHERE f.cbCreateur = :cbCreateur"),
    @NamedQuery(name = "FCaisse.findByCbModification", query = "SELECT f FROM FCaisse f WHERE f.cbModification = :cbModification"),
    @NamedQuery(name = "FCaisse.findByCbReplication", query = "SELECT f FROM FCaisse f WHERE f.cbReplication = :cbReplication"),
    @NamedQuery(name = "FCaisse.findByCbFlag", query = "SELECT f FROM FCaisse f WHERE f.cbFlag = :cbFlag")})
public class FCaisse implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "CA_No")
    private Integer cANo;
    @Column(name = "CA_Intitule")
    private String cAIntitule;
    @Lob
    @Column(name = "cbCA_Intitule")
    private byte[] cbCAIntitule;
    @Column(name = "CO_No")
    private Integer cONo;
    @Column(name = "CO_NoCaissier")
    private Integer cONoCaissier;
    @Lob
    @Column(name = "cbCT_Num")
    private byte[] cbCTNum;
    @Basic(optional = false)
    @Column(name = "JO_Num")
    private String jONum;
    @Column(name = "CA_IdentifCaissier")
    private Short cAIdentifCaissier;
    @Column(name = "CA_DateCreation")
    @Temporal(TemporalType.TIMESTAMP)
    private Date cADateCreation;
    @Column(name = "N_Comptoir")
    private Short nComptoir;
    @Column(name = "N_Clavier")
    private Short nClavier;
    @Column(name = "CA_LignesAfficheur")
    private Short cALignesAfficheur;
    @Column(name = "CA_ColonnesAfficheur")
    private Short cAColonnesAfficheur;
    @Column(name = "CA_ImpTicket")
    private Short cAImpTicket;
    @Column(name = "CA_SaisieVendeur")
    private Short cASaisieVendeur;
    @Column(name = "CA_Souche")
    private Short cASouche;
    @Column(name = "cbProt")
    private Short cbProt;
    @Id
    @Basic(optional = false)
    @Column(name = "cbMarq")
    private Integer cbMarq;
    @Column(name = "cbCreateur")
    private String cbCreateur;
    @Column(name = "cbModification")
    @Temporal(TemporalType.TIMESTAMP)
    private Date cbModification;
    @Column(name = "cbReplication")
    private Integer cbReplication;
    @Column(name = "cbFlag")
    private Short cbFlag;
    @OneToMany(mappedBy = "cbCANo")
    private Collection<FDocentete> fDocenteteCollection;
    @JoinColumn(name = "cbCO_NoCaissier", referencedColumnName = "CO_No")
    @ManyToOne
    private FCollaborateur cbCONoCaissier;
    @JoinColumn(name = "cbCO_No", referencedColumnName = "CO_No")
    @ManyToOne
    private FCollaborateur cbCONo;
    @JoinColumn(name = "CT_Num", referencedColumnName = "CT_Num")
    @ManyToOne(optional = false)
    private FComptet cTNum;
    @JoinColumn(name = "DE_No", referencedColumnName = "DE_No")
    @ManyToOne(optional = false)
    private FDepot dENo;

    public FCaisse() {
    }

    public FCaisse(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public FCaisse(Integer cbMarq, String jONum) {
        this.cbMarq = cbMarq;
        this.jONum = jONum;
    }

    public Integer getCANo() {
        return cANo;
    }

    public void setCANo(Integer cANo) {
        this.cANo = cANo;
    }

    public String getCAIntitule() {
        return cAIntitule;
    }

    public void setCAIntitule(String cAIntitule) {
        this.cAIntitule = cAIntitule;
    }

    public byte[] getCbCAIntitule() {
        return cbCAIntitule;
    }

    public void setCbCAIntitule(byte[] cbCAIntitule) {
        this.cbCAIntitule = cbCAIntitule;
    }

    public Integer getCONo() {
        return cONo;
    }

    public void setCONo(Integer cONo) {
        this.cONo = cONo;
    }

    public Integer getCONoCaissier() {
        return cONoCaissier;
    }

    public void setCONoCaissier(Integer cONoCaissier) {
        this.cONoCaissier = cONoCaissier;
    }

    public byte[] getCbCTNum() {
        return cbCTNum;
    }

    public void setCbCTNum(byte[] cbCTNum) {
        this.cbCTNum = cbCTNum;
    }

    public String getJONum() {
        return jONum;
    }

    public void setJONum(String jONum) {
        this.jONum = jONum;
    }

    public Short getCAIdentifCaissier() {
        return cAIdentifCaissier;
    }

    public void setCAIdentifCaissier(Short cAIdentifCaissier) {
        this.cAIdentifCaissier = cAIdentifCaissier;
    }

    public Date getCADateCreation() {
        return cADateCreation;
    }

    public void setCADateCreation(Date cADateCreation) {
        this.cADateCreation = cADateCreation;
    }

    public Short getNComptoir() {
        return nComptoir;
    }

    public void setNComptoir(Short nComptoir) {
        this.nComptoir = nComptoir;
    }

    public Short getNClavier() {
        return nClavier;
    }

    public void setNClavier(Short nClavier) {
        this.nClavier = nClavier;
    }

    public Short getCALignesAfficheur() {
        return cALignesAfficheur;
    }

    public void setCALignesAfficheur(Short cALignesAfficheur) {
        this.cALignesAfficheur = cALignesAfficheur;
    }

    public Short getCAColonnesAfficheur() {
        return cAColonnesAfficheur;
    }

    public void setCAColonnesAfficheur(Short cAColonnesAfficheur) {
        this.cAColonnesAfficheur = cAColonnesAfficheur;
    }

    public Short getCAImpTicket() {
        return cAImpTicket;
    }

    public void setCAImpTicket(Short cAImpTicket) {
        this.cAImpTicket = cAImpTicket;
    }

    public Short getCASaisieVendeur() {
        return cASaisieVendeur;
    }

    public void setCASaisieVendeur(Short cASaisieVendeur) {
        this.cASaisieVendeur = cASaisieVendeur;
    }

    public Short getCASouche() {
        return cASouche;
    }

    public void setCASouche(Short cASouche) {
        this.cASouche = cASouche;
    }

    public Short getCbProt() {
        return cbProt;
    }

    public void setCbProt(Short cbProt) {
        this.cbProt = cbProt;
    }

    public Integer getCbMarq() {
        return cbMarq;
    }

    public void setCbMarq(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public String getCbCreateur() {
        return cbCreateur;
    }

    public void setCbCreateur(String cbCreateur) {
        this.cbCreateur = cbCreateur;
    }

    public Date getCbModification() {
        return cbModification;
    }

    public void setCbModification(Date cbModification) {
        this.cbModification = cbModification;
    }

    public Integer getCbReplication() {
        return cbReplication;
    }

    public void setCbReplication(Integer cbReplication) {
        this.cbReplication = cbReplication;
    }

    public Short getCbFlag() {
        return cbFlag;
    }

    public void setCbFlag(Short cbFlag) {
        this.cbFlag = cbFlag;
    }

    @XmlTransient
    public Collection<FDocentete> getFDocenteteCollection() {
        return fDocenteteCollection;
    }

    public void setFDocenteteCollection(Collection<FDocentete> fDocenteteCollection) {
        this.fDocenteteCollection = fDocenteteCollection;
    }

    public FCollaborateur getCbCONoCaissier() {
        return cbCONoCaissier;
    }

    public void setCbCONoCaissier(FCollaborateur cbCONoCaissier) {
        this.cbCONoCaissier = cbCONoCaissier;
    }

    public FCollaborateur getCbCONo() {
        return cbCONo;
    }

    public void setCbCONo(FCollaborateur cbCONo) {
        this.cbCONo = cbCONo;
    }

    public FComptet getCTNum() {
        return cTNum;
    }

    public void setCTNum(FComptet cTNum) {
        this.cTNum = cTNum;
    }

    public FDepot getDENo() {
        return dENo;
    }

    public void setDENo(FDepot dENo) {
        this.dENo = dENo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cbMarq != null ? cbMarq.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FCaisse)) {
            return false;
        }
        FCaisse other = (FCaisse) object;
        if ((this.cbMarq == null && other.cbMarq != null) || (this.cbMarq != null && !this.cbMarq.equals(other.cbMarq))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityprojet.FCaisse[ cbMarq=" + cbMarq + " ]";
    }
    
}
